<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test01</title>
</head>
<body>
<script type="text/javascript">
    let arrLikeObj = {"0": "a", "1": "b", "2": "c", "7": "h", length: 3};

    Array.from(arrLikeObj).forEach(function (item) {
        // console.log(item);
    });

    let arr01 = Array.from(arrLikeObj).map(function (item) {
        return item + "888";
    });

    let arr02 = Array.from(arrLikeObj, function (item) {
        return item + "888";
    });

    // console.log(arr02);

    let set = new Set();
    set.add(5);
    set.add(6);
    set.add(7);
    set.add(8);

    let map = new Map();
    map.set("name", "zhangsan");
    map.set("age", 18);

    let arr03 = Array.from(set);
    let arr04 = Array.from(map);

    // console.log(arr04);
    // console.log(map);

    let arr05 = Array.of("a", "b", "c");

    let arr06 = new Array(10, 20, 30);
    let arr07 = new Array(10);
    let arr08 = Array.of(10);

    // console.log(arr08);

    let arr09 = [10, 20, 30, 40, 50, 60, 70, 80];

    arr09.copyWithin(1, 5, 7);

    // console.log(arr09);

    let arr10 = [10, 20, 30, 40, 50, 60, 70, 80];

    // let item01 = arr10.find(function (value, index, arrObj) {
    let item01 = arr10.findIndex(function (value, index, arrObj) {
        if (value > 50) {
            return true;
        } else {
            return false;
        }
    });

    // console.log(item01);

    let arr11 = [10, 20, 30, 40, 50, 60, 70, 80];

    // console.log(arr11.fill(88));

    let keys = arr11.keys();
    let values = arr11.keys();
    let entries = arr11.entries();

    // for(let i of keys) {
    // for(let i of values) {
    // for(let i of entries) {
    for (let [key, value] of entries) {
        // console.log(i);
        // console.log(key + ":" + value);
    }

    // console.log(arr11.includes(80));
    // console.log(arr11.includes(88));

    let arr12 = [10, , 30, , 50, , 70, 80];

    // console.log(arr12.length);
    // console.log(arr12);

    // for (let i of arr12) {
    //     console.log(i);
    // }

    arr12.forEach(function (item) {
        console.log(item);
    })
</script>
</body>
</html>